package com.fy.tt.dao;

import com.fy.toolhelper.db.IBaseDao;
import com.fy.tt.entity.Sentence;
import com.fy.tt.entity.query.SentenceQuery;
import com.fy.tt.entity.vo.SentenceVo;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author xiaoliang
 * @since 2021-07-13
 */
public interface SentenceDao extends IBaseDao<Sentence> {
    List<SentenceVo> getAllSentences(Connection connection) throws SQLException;

    int getTotalSentence(Connection connection, SentenceQuery sentenceQuery) throws SQLException;

    int deleteSentence(Connection connection, int id) throws SQLException;

    // 分页查询
    List<Sentence> getPageSentences(Connection connection, int pageSize, int current) throws SQLException;
    // 分页多条件查询
    List<SentenceVo> getConditionPageSentences(Connection connection, SentenceQuery sentenceQuery, int pageSize, int current) throws SQLException;
}
